package com.yiyahui.project.erp.service.impl;

import java.util.List;
import com.yiyahui.common.utils.DateUtils;
import com.yiyahui.project.erp.domain.requestVo.YiyaVisitTcRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiyahui.project.erp.mapper.YiyaVisitTcMapper;
import com.yiyahui.project.erp.domain.YiyaVisitTc;
import com.yiyahui.project.erp.service.IYiyaVisitTcService;

/**
 * tc回访Service业务层处理
 * 
 * @author yiyahui
 * @date 2020-05-08
 */
@Service
public class YiyaVisitTcServiceImpl implements IYiyaVisitTcService 
{
    @Autowired
    private YiyaVisitTcMapper yiyaVisitTcMapper;

    /**
     * 查询tc回访
     * 
     * @param id tc回访ID
     * @return tc回访
     */
    @Override
    public YiyaVisitTc selectYiyaVisitTcById(Long id)
    {
        return yiyaVisitTcMapper.selectYiyaVisitTcById(id);
    }

    /**
     * 查询tc回访列表
     * 
     * @param yiyaVisitTcRequest tc回访
     * @return tc回访
     */
    @Override
    public List<YiyaVisitTc> selectYiyaVisitTcList(YiyaVisitTcRequest yiyaVisitTcRequest)
    {
        return yiyaVisitTcMapper.selectYiyaVisitTcList(yiyaVisitTcRequest);
    }

    /**
     * 新增tc回访
     * 
     * @param yiyaVisitTc tc回访
     * @return 结果
     */
    @Override
    public int insertYiyaVisitTc(YiyaVisitTc yiyaVisitTc)
    {
        yiyaVisitTc.setCreateTime(DateUtils.getNowDate());
        return yiyaVisitTcMapper.insertYiyaVisitTc(yiyaVisitTc);
    }

    /**
     * 修改tc回访
     * 
     * @param yiyaVisitTc tc回访
     * @return 结果
     */
    @Override
    public int updateYiyaVisitTc(YiyaVisitTc yiyaVisitTc)
    {
        yiyaVisitTc.setUpdateTime(DateUtils.getNowDate());
        return yiyaVisitTcMapper.updateYiyaVisitTc(yiyaVisitTc);
    }

    /**
     * 批量删除tc回访
     * 
     * @param ids 需要删除的tc回访ID
     * @return 结果
     */
    @Override
    public int deleteYiyaVisitTcByIds(Long[] ids)
    {
        return yiyaVisitTcMapper.deleteYiyaVisitTcByIds(ids);
    }

    /**
     * 删除tc回访信息
     * 
     * @param id tc回访ID
     * @return 结果
     */
    @Override
    public int deleteYiyaVisitTcById(Long id)
    {
        return yiyaVisitTcMapper.deleteYiyaVisitTcById(id);
    }
}
